#ifndef IFACTORY_H
#define IFACTORY_H

#include<iproduct.h>
class IFactory //抽象工厂
{
public:
    enum FACTORY_TYPE{   //工厂类型
        FACTORY_A,
        FACTORY_B,
        FACTORY_C
    };
    IFactory();
    virtual ~IFactory(){}
    virtual IProductA* CreateProductA()=0; //抽象产品A
    virtual IProductB* CreateProductB()=0;//抽象产品B
    static IFactory* CreateFactory(FACTORY_TYPE factory);//工厂函数


};

#endif // IFACTORY_H
